<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取已注册的套接字传输协议列表</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.stream-get-transports" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">stream_get_transports</h1>
  <p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">stream_get_transports</span> &mdash; <span class="dc-title">获取已注册的套接字传输协议列表</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.stream-get-transports-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>stream_get_transports</strong></span>
    ( <span class="methodparam">void</span>
   ) : <span class="type">array</span></div>

  <p class="simpara">
   返回一个包含当前运行系统中所有套接字传输协议名称的索引数组。
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.stream-get-transports-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回一个套接字传输协议名称的索引数组。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.stream-get-transports-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4825">
    <p><strong>Example #1 使用 <span class="function"><strong>stream_get_transports()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$xportlist&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_get_transports</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$xportlist</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array (
  [0] =&gt; tcp
  [1] =&gt; udp
  [2] =&gt; unix
  [3] =&gt; udg
)
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.stream-get-transports-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="stream_get_filters.html" class="function" rel="rdfs-seeAlso">stream_get_filters()</a> - 获取已注册的数据流过滤器列表</span></li>
   <li class="member"><span class="function"><a href="stream_get_wrappers.html" class="function" rel="rdfs-seeAlso">stream_get_wrappers()</a> - 获取已注册的流类型</span></li>
  </ul>
 </div>

</div></div></div></body></html>